package cn.mingfancloud.基础知识.字符串;

public class TrimDemo {
    public static void main(String[] args) {
        String str = "       abc            ";
        String shortStr = str.trim(); // 去除字符串首尾的空白内容
        System.out.println("str的原值是：[" + str + "]");
        System.out.println("去掉首尾空白的值：[" + shortStr + "]");
    }
}
